跳到主要内容

Screen Control 屏幕控制

Screen Send Mouse Action 屏幕发送鼠标操作动作

{
"action": "pointerEvent",
"comm": {
"deviceIds": "fa3523ea0510,8318fc66",
"mask": "0",
"x": "0.5",
"y": "0.5",
"endx": "0",
"endy": "0",
"delta": "1"
}
}

Operational Events

mask 事件类型:
0按下 1移动 2松开 3鼠标右键 4滚轮向上 5滚轮向下 6上滑 7下滑 8左滑 9右滑
x,y 坐标 传百分比 百分比 endx endy 也是
上滑 下滑 左滑 右滑 需要传endx endy 其他事件传0就行
滚轮向上 滚轮向下需要传delta 其他不用传

mask Event type
0 press 1 move 2 release 3 right mouse button 4 wheel up 5 wheel down 6 slide up 7 slide down 8 slide left 9 slide right
x, y coordinates Pass percentage Percentage endx endy also
Slide up Slide down Slide left Slide right Need to pass endx endy Other events just pass 0
Wheel up, wheel down, delta, nothing else.

上滑屏幕 Demo A demo example of a slide-up screen

//先执行按下 mask=0 x=0.5 y=0.5 从中间位置开始
//Perform the press action first mask=0 x=0.5 y=0.5 From the center.

{
"action": "PointerEvent",
"comm": {
"deviceIds":"all",
"mask":"0",
"x":"0.5",
"y":"0.5",
"endx":"0",
"endy":"0",
"delta":"0"
}
}



//执行移动mask=1 y移动到0.2位置 松开前可执行多个移动就会变成拖动
//Next, execute the move mask=1 y move to 0.2
//Multiple moves can be performed before releasing and they become drags.

{
"action": "PointerEvent",
"comm": {
"deviceIds":"all",
"mask":"1",
"x":"0.5",
"y":"0.2",
"endx":"0",
"endy":"0",
"delta":"0"
}
}



//最后松开mask=2 x y 传最后移动到的位置
//Finally release mask=2 x y pass the last position moved to
{
"action": "PointerEvent",
"comm": {
"deviceIds":"all",
"mask":"2",
"x":"0.5",
"y":"0.2",
"endx":"0",
"endy":"0",
"delta":"0"
}
}

TIP:

deviceIds Parameters example:all,8318fc66,fa3523ea0510

deviceIds 参数 传all代表所有手机,也可以传 手机连接名.如:8318fc66,fa3523ea0510